Testing CodeFusion Script

Thorough testing is essential before deploying new or modified scripts to production.

The built-in testing console in CodeFusion enables you to validate logic, API integrations, and transformations before you publish changes. This reduces risk and helps ensure a smooth experience for end users.

To test a CodeFusion script:

  1. Select the script you want to test from the CodeFusion script list.

  2. Click Test code.

    The Test console area displays the output and console log.

  3. Confirm that the data, structure, and transformations match your expectations.

  4. If the script runs successfully, click Save and then Publish to make it available for use.

  5. If errors appear, use the logs to debug and iterate on your script until tests pass.

  6. Click to copy the output .

Tip: Use sample input values that closely mimic your production environment to maximize confidence in your testing.